<?php
namespace app\api\model;


class AnnounceImg extends BaseModel
{

	protected $hidden = ['img_id', 'status', 'img_id', 'update_time', 'create_time'];

	public function img()
	{
		return $this->belongsTo('Image', 'img_id', 'id');
	}

	public static function getAnnounceImg()
	{
		$img = self::with('img')->where('status', '=', 1)->limit(2)->select();

		return $img;
	}
}